package com.me.forum.controller;


import com.me.forum.domain.Category;
import com.me.forum.service.ICategoryService;
import com.me.forum.service.impl.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private ICategoryService categoryService;

    /**
     * @description:获取所有分区
     * @author:ly
     * @createTime:2020-05-05 17:37
     */
    @GetMapping(value = "/findAll")
    public List<Category> findAll() {
        return categoryService.getAll();
    }
}